<template>
<div>
  账号：<input type="text" v-model="form.username"><br>
  密码：<input type="text" v-model="form.password"><br>
  <button @click="denglu">登录</button>

</div>

</template>

<script>
import axios from 'axios';
export default {
name: "xiaologin"
,
  data(){
    return{
      form:{},
      id:1,
    }
  },
  methods:{
  denglu(){
    axios({url:' http://127.0.0.1:5000/denglu',method:'post',data:this.form}).then(res=>{
      console.log(res)
      this.router.push({path:'/xiaotianjia',params:{id:this.id}})
    })
  },
    
  },
  mounted() {
  }
}
</script>

<style scoped>

</style>